import axios from 'axios'
import Vue from 'vue'

axios.defaults.baseURL = 'https://autumnfish.cn'

export function getSliderPics(callback){
  axios.get('/banner?type=2').then(res => {
    callback(res.data.banners)
    // console.log(res.data.banners)
  })
  .catch(err => console.log(err))
}
export function getUserSong(callback){
  axios.get("/personalized/newsong").then(res=>{
    callback({data:res.data,status:1})
  })
  .catch({data:[],status:0})
}
export function geOneSong({id}){
   return axios.get(`/song/url?id=${id}`)
}